﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;



public partial class json序列化 : System.Web.UI.Page
{




    protected void Page_Load(object sender, EventArgs e)
    {
        var t = new css() { name = "fdsfsd", ccc = 1 };
        Response.Write(JsonHelper.JsonSerializer<css>(t));

        Response.Write(Newtonsoft.Json.JsonConvert.SerializeObject(t));
    }
}

[System.Runtime.Serialization.DataContract]
public class css
{
    [Newtonsoft.Json.JsonProperty(PropertyName = "东东")]
    [System.Runtime.Serialization.DataMember(Name = "什么哦", IsRequired = true)]
    public string name { get; set; }

    [System.Runtime.Serialization.DataMember(Name = "什么2哦", IsRequired = true)]
    public int ccc { get; set; }
}